package top.kaoshanji.r3ch11b;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.testng.annotations.Test;

/**
 * 代码清单test-r3ch11b-01：测试一下编程式事务管理
 * @author kaoshanji
 * ^_^
 * create time 2025/5/9 13:45
 */
@ContextConfiguration(locations = {"classpath:r3ch11b/tx-programming-beans.xml"})
public class ForumTxProgrammingServiceTest extends AbstractTransactionalTestNGSpringContextTests {

    @Autowired
    private ForumTxProgrammingService forumService;

    @Test
    public void addForum() {
        Forum forum = new Forum();
        forum.setForumDesc("desc");
        forum.setForumName("name");
        forumService.addForum(forum);
    }


}
